
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>2.2、定义 · 《RFC6470 NETCONF 通知》学习笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="HMW">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../part3/ianaConsideration.html" />
    
    
    <link rel="prev" href="overView.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    关于RFC6470
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../part1/Introduction.html">
            
                <a href="../part1/Introduction.html">
            
                    
                    1、概要
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="yang4Notifications.html">
            
                <a href="yang4Notifications.html">
            
                    
                    2、YANG通知模块
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="overView.html">
            
                <a href="overView.html">
            
                    
                    2.1、概览
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.3.2" data-path="definitions.html">
            
                <a href="definitions.html">
            
                    
                    2.2、定义
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../part3/ianaConsideration.html">
            
                <a href="../part3/ianaConsideration.html">
            
                    
                    3、IANA考虑
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../part4/security.html">
            
                <a href="../part4/security.html">
            
                    
                    4、安全考虑
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >2.2、定义</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><ul><li><span class="title-icon "></span><a href="#22-&#x5B9A;&#x4E49;"><b></b>2.2 &#x5B9A;&#x4E49;</a></li></ul></ul></div><a href="#" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h2 id="22-&#x5B9A;&#x4E49;"><a name="22-&#x5B9A;&#x4E49;" class="anchor-navigation-ex-anchor" href="#22-&#x5B9A;&#x4E49;"><i class="fa fa-link" aria-hidden="true"></i></a><a name="22-&#x5B9A;&#x4E49;" class="plugin-anchor" href="#22-&#x5B9A;&#x4E49;"><i class="fa fa-link" aria-hidden="true"></i></a>2.2 &#x5B9A;&#x4E49;</h2>
<pre><code>&lt;CODE BEGINS&gt; file=&quot;ietf-netconf-notifications@2011-12-09.yang&quot;

   module ietf-netconf-notifications {

      namespace
        &quot;urn:ietf:params:xml:ns:yang:ietf-netconf-notifications&quot;;

      prefix ncn;

      import ietf-inet-types { prefix inet; }
      import ietf-netconf { prefix nc; }

      organization
        &quot;IETF NETCONF (Network Configuration Protocol) Working Group&quot;;

      contact
        &quot;WG Web:   &lt;http://tools.ietf.org/wg/netconf/&gt;
         WG List:  &lt;mailto:netconf@ietf.org&gt;

         WG Chair: Bert Wijnen
                   &lt;mailto:bertietf@bwijnen.net&gt;

         WG Chair: Mehmet Ersue
                   &lt;mailto:mehmet.ersue@nsn.com&gt;

         Editor:   Andy Bierman
                   &lt;mailto:andy@netconfcentral.org&gt;&quot;;

      description
        &quot;This module defines a YANG data model for use with the
         NETCONF protocol that allows the NETCONF client to
         receive common NETCONF base event notifications.

         Copyright (c) 2012 IETF Trust and the persons identified as
         the document authors.  All rights reserved.

         Redistribution and use in source and binary forms, with or
         without modification, is permitted pursuant to, and subject
         to the license terms contained in, the Simplified BSD License
         set forth in Section 4.c of the IETF Trust&apos;s Legal Provisions
         Relating to IETF Documents
         (http://trustee.ietf.org/license-info).

         This version of this YANG module is part of RFC 6470; see
         the RFC itself for full legal notices.&quot;;

      revision &quot;2012-02-06&quot; {
        description
          &quot;Initial version.&quot;;
        reference
          &quot;RFC 6470: NETCONF Base Notifications&quot;;
      }

     grouping common-session-parms {
       description
         &quot;Common session parameters to identify a
          management session.&quot;;

       leaf username {
         type string;
         mandatory true;
         description
           &quot;Name of the user for the session.&quot;;
       }

       leaf session-id {
         type nc:session-id-or-zero-type;
         mandatory true;
         description
           &quot;Identifier of the session.
            A NETCONF session MUST be identified by a non-zero value.
            A non-NETCONF session MAY be identified by the value zero.&quot;;
       }

       leaf source-host {
         type inet:ip-address;
         description
           &quot;Address of the remote host for the session.&quot;;
       }
     }

     grouping changed-by-parms {
       description
         &quot;Common parameters to identify the source
          of a change event, such as a configuration
          or capability change.&quot;;

       container changed-by {
         description
           &quot;Indicates the source of the change.
            If caused by internal action, then the
            empty leaf &apos;server&apos; will be present.
            If caused by a management session, then
            the name, remote host address, and session ID
            of the session that made the change will be reported.&quot;;
         choice server-or-user {
           mandatory true;
           leaf server {
             type empty;
             description
               &quot;If present, the change was caused
                by the server.&quot;;
           }

           case by-user {
             uses common-session-parms;
           }
         } // choice server-or-user
       } // container changed-by-parms
     }


     notification netconf-config-change {
       description
         &quot;Generated when the NETCONF server detects that the
          &lt;running&gt; or &lt;startup&gt; configuration datastore
          has been changed by a management session.
          The notification summarizes the edits that
          have been detected.

          The server MAY choose to also generate this
          notification while loading a datastore during the
          boot process for the device.&quot;;

       uses changed-by-parms;
       leaf datastore {
         type enumeration {
           enum running {
             description &quot;The &lt;running&gt; datastore has changed.&quot;;
           }
           enum startup {
             description &quot;The &lt;startup&gt; datastore has changed&quot;;
           }
         }
         default &quot;running&quot;;
         description
           &quot;Indicates which configuration datastore has changed.&quot;;
       }

       list edit {
         description
           &quot;An edit record SHOULD be present for each distinct
            edit operation that the server has detected on
            the target datastore.  This list MAY be omitted
            if the detailed edit operations are not known.
            The server MAY report entries in this list for
            changes not made by a NETCONF session (e.g., CLI).&quot;;

         leaf target {
           type instance-identifier;
           description
             &quot;Topmost node associated with the configuration change.
              A server SHOULD set this object to the node within
              the datastore that is being altered.  A server MAY
              set this object to one of the ancestors of the actual
              node that was changed, or omit this object, if the
              exact node is not known.&quot;;
         }

         leaf operation {
           type nc:edit-operation-type;
           description
             &quot;Type of edit operation performed.
              A server MUST set this object to the NETCONF edit
              operation performed on the target datastore.&quot;;
         }
       } // list edit
     } // notification netconf-config-change

     notification netconf-capability-change {
       description
         &quot;Generated when the NETCONF server detects that
          the server capabilities have changed.
          Indicates which capabilities have been added, deleted,
          and/or modified.  The manner in which a server
          capability is changed is outside the scope of this
          document.&quot;;

       uses changed-by-parms;

       leaf-list added-capability {
         type inet:uri;
         description
           &quot;List of capabilities that have just been added.&quot;;
       }

       leaf-list deleted-capability {
         type inet:uri;
         description
           &quot;List of capabilities that have just been deleted.&quot;;
       }

       leaf-list modified-capability {
         type inet:uri;
         description
           &quot;List of capabilities that have just been modified.
            A capability is considered to be modified if the
            base URI for the capability has not changed, but
            one or more of the parameters encoded at the end of
            the capability URI have changed.
            The new modified value of the complete URI is returned.&quot;;
       }
     } // notification netconf-capability-change


     notification netconf-session-start {
       description
         &quot;Generated when a NETCONF server detects that a
          NETCONF session has started.  A server MAY generate
          this event for non-NETCONF management sessions.
          Indicates the identity of the user that started
          the session.&quot;;
       uses common-session-parms;
     } // notification netconf-session-start

     notification netconf-session-end {
       description
         &quot;Generated when a NETCONF server detects that a
          NETCONF session has terminated.
          A server MAY optionally generate this event for
          non-NETCONF management sessions.  Indicates the
          identity of the user that owned the session,
          and why the session was terminated.&quot;;

       uses common-session-parms;

       leaf killed-by {
         when &quot;../termination-reason = &apos;killed&apos;&quot;;
         type nc:session-id-type;
         description
           &quot;The ID of the session that directly caused this session
            to be abnormally terminated.  If this session was abnormally
            terminated by a non-NETCONF session unknown to the server,
            then this leaf will not be present.&quot;;
       }

       leaf termination-reason {
         type enumeration {
           enum &quot;closed&quot; {
             description
               &quot;The session was terminated by the client in normal
                fashion, e.g., by the NETCONF &lt;close-session&gt;
                protocol operation.&quot;;
           }
           enum &quot;killed&quot; {
             description
               &quot;The session was terminated in abnormal
                fashion, e.g., by the NETCONF &lt;kill-session&gt;
                protocol operation.&quot;;
           }
           enum &quot;dropped&quot; {
             description
               &quot;The session was terminated because the transport layer
                connection was unexpectedly closed.&quot;;
           }
           enum &quot;timeout&quot; {
             description
               &quot;The session was terminated because of inactivity,
                e.g., waiting for the &lt;hello&gt; message or &lt;rpc&gt;
                messages.&quot;;
           }
           enum &quot;bad-hello&quot; {
             description
               &quot;The client&apos;s &lt;hello&gt; message was invalid.&quot;;
           }
           enum &quot;other&quot; {
             description
               &quot;The session was terminated for some other reason.&quot;;
           }
         }
         mandatory true;
         description
           &quot;Reason the session was terminated.&quot;;
       }
     } // notification netconf-session-end

     notification netconf-confirmed-commit {
       description
         &quot;Generated when a NETCONF server detects that a
          confirmed-commit event has occurred.  Indicates the event
          and the current state of the confirmed-commit procedure
          in progress.&quot;;
       reference
         &quot;RFC 6241, Section 8.4&quot;;

       uses common-session-parms {
         when &quot;../confirm-event != &apos;timeout&apos;&quot;;
       }

       leaf confirm-event {
         type enumeration {
           enum &quot;start&quot; {
             description
               &quot;The confirmed-commit procedure has started.&quot;;
           }
           enum &quot;cancel&quot; {
             description
               &quot;The confirmed-commit procedure has been canceled,
                e.g., due to the session being terminated, or an
                explicit &lt;cancel-commit&gt; operation.&quot;;
           }
           enum &quot;timeout&quot; {
             description
               &quot;The confirmed-commit procedure has been canceled
                due to the confirm-timeout interval expiring.
                The common session parameters will not be present
                in this sub-mode.&quot;;
           }
           enum &quot;extend&quot; {
             description
               &quot;The confirmed-commit timeout has been extended,
                e.g., by a new &lt;confirmed-commit&gt; operation.&quot;;
           }
           enum &quot;complete&quot; {
             description
               &quot;The confirmed-commit procedure has been completed.&quot;;
           }
         }
         mandatory true;
         description
           &quot;Indicates the event that caused the notification.&quot;;
       }

       leaf timeout {
         when
           &quot;../confirm-event = &apos;start&apos; or ../confirm-event = &apos;extend&apos;&quot;;
         type uint32;
         units &quot;seconds&quot;;
         description
           &quot;The configured timeout value if the event type
            is &apos;start&apos; or &apos;extend&apos;.  This value represents
            the approximate number of seconds from the event
            time when the &apos;timeout&apos; event might occur.&quot;;
       }
     } // notification netconf-confirmed-commit

   }

   &lt;CODE ENDS&gt;
</code></pre>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="overView.html" class="navigation navigation-prev " aria-label="Previous page: 2.1、概览">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../part3/ianaConsideration.html" class="navigation navigation-next " aria-label="Next page: 3、IANA考虑">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"2.2、定义","level":"1.3.2","depth":2,"next":{"title":"3、IANA考虑","level":"1.4","depth":1,"path":"part3/ianaConsideration.md","ref":"part3/ianaConsideration.md","articles":[]},"previous":{"title":"2.1、概览","level":"1.3.1","depth":2,"path":"part2/overView.md","ref":"part2/overView.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-sharing","splitter","expandable-chapters-small","anchors","anchor-navigation-ex","livereload"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"github":{"url":"https://github.com/Blankj"},"livereload":{},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"anchor-navigation-ex":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":true,"showLevel":false},"expandable-chapters-small":{},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{}},"theme":"default","author":"HMW","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"《RFC6470 NETCONF 通知》学习笔记","language":"zh-hans","gitbook":"*","description":"RFC6470学习笔记"},"file":{"path":"part2/definitions.md","mtime":"2021-05-17T09:11:23.796Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-05-17T09:48:53.702Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

